package simple.utils;

import org.nutz.ioc.Ioc;
import org.nutz.mvc.NutConfig;

public class IocUtil {
    private static Ioc ioc=null;
    public static void init(NutConfig conf){
        ioc = conf.getIoc();
    }
    public static <T> T  get(Class<T> type){
        if(ioc == null){
            return null;
        }
        return ioc.get(type);
    }
}
